{{include file="default/Public/header.html"}}
<div id="pageTop">
	<div class="tabs"> 
		<ul>
			<li><a href='{{U url="fask/manage?catid=`$cat.catid`"}}'>管理问答</a></li>
			<li><a href='{{U url="fask/category_manage?catid=`$cat.catid`"}}' class="selected" rel="tabsContent1">管理问答分类</a></li>
		</ul>		
	</div>
</div>
<div id="pageCo">
	<div class="listForm">
		<table cellpadding="0" cellspacing="0">
			<thead>
				<th width="30">ID</th>
				<th>名称</th>
				<th width="60">排序</th>
				<th width="160">创建时间</th>
				<th width="140">操作</th>
			</thead>
			<tbody>
			{{$html}}
			</tbody>
		</table>
	</div>
	<div class="manageForm">
		{{if $msg != ''}}
		<div id="messageContainer">
			<ol><li>{{$msg}}</li></ol>
		</div>
		{{/if}}
		<form method="POST" action='{{U url="fask/category_manage?act=add"}}'>
		<table cellpadding="0" cellspacing="0" class="tabcontent" id="tabsContent1">
			<tbody>
				<tr>
					<th colspan="2" style="text-align:center;font-weight:bold;">创建新分类</th>
				</tr>
				<tr>
			      <th width='150'>名称</th>
			      <td><input type="text" name="info[name]" class="input required" value="" style="width:200px" /></td>
			    </tr>
			    <tr>
			      <th width='150'>上级栏目</th>
			      <td><select name="info[parentid]">
							<option value="0">顶级分类</option>
							{{$categorys_option}}
						</select></td>
			    </tr>
			    <tr>
			      <th width='150'>排序</th>
			      <td>
			      <input type="text" name="info[sort]" class="input" value="0" size="4" />
			      </td>
			    </tr>
			    <tr>
			      <th width='150'>是否显示</th>
			      <td><input type="checkbox" name="info[status]" value="1" class="input" checked /></td>
			    </tr>
			    <tr>
			      <th width='150'>创建时间</th>
			      <td><script language="javascript" src="__ROOT__/admin/public/js/calendar/WdatePicker.js"></script>
		            	<input type="text" name="info[create_time]" class="Wdate input" onFocus="WdatePicker({isShowClear:true,dateFmt:'yyyy-MM-dd HH:mm'})" value="{{'Y-m-d H:i'|date:$smarty.now}}" /></td>
			    </tr>
			</tbody>
			<tfoot>
			    <tr>
			      <th>&nbsp;</th>
			      <td>
                        <label class="btn"><input type="submit" value="添加" class="submit" /></label>
						&nbsp;<label class="btn"><input type="reset" value="重置" class="submit" /></label>
						<input type="hidden" name="catid" value="{{$cat.catid}}" />
						<input type="hidden" name="info[catid]" value="{{$cat.catid}}" />
				  </td>
			    </tr>
				</tfoot>
		</table>
		</form>
	</div>
</div>
{{include file="default/Public/footer.html"}}